package com.kltong.inf.dubbo.config;

import org.springframework.context.annotation.Scope;

import com.baidu.disconf.client.common.annotations.DisconfFile;
import com.baidu.disconf.client.common.annotations.DisconfFileItem;

@Scope("singleton")
@DisconfFile(filename = "sentinel.properties")

/**
 * dubbo.appname=ma_ppluspay dubbo.registry=zookeeper://192.168.80.5:2181
 * dubbo.protocol=dubbo dubbo.port=-1
 * 
 * @author alvy
 *
 */
public class SentinelProperties {

	/**
	 * 日志路径
	 */
	private String logDir = "";

	/**
	 * 应用名称
	 */
	private String appName = "";

	/**
	 * 控制台的地址，指定控制台后客户端会自动向该地址发送心跳包。地址格式为：hostIp:port
	 */
	private String dashBoardServer = "";

	/**
	 * 本地启动 HTTP API Server 的端口号
	 */
	private String apiPort = "";

	@DisconfFileItem(name = "log.dir", associateField = "logDir")
	public String getLogDir() {
		return logDir;
	}

	@DisconfFileItem(name = "app.name", associateField = "appName")
	public String getAppName() {
		return appName;
	}

	@DisconfFileItem(name = "dashboard.server", associateField = "dashBoardServer")
	public String getDashBoardServer() {
		return dashBoardServer;
	}

	@DisconfFileItem(name = "api.port", associateField = "apiPort")
	public String getApiPort() {
		return apiPort;
	}

}